home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 1998 August / PC Plus SuperCD 50a Issue 142 (CD142a) (August 1998).iso / full / jbuild / setup / JBuilder / jsamples.z / Frame1.java < prev    next >
Encoding:
Java Source  |  1997-07-03  |  19.2 KB  |  591 lines

  1.  
  2. package borland.samples.jbcl.treecontrol;
  3.  
  4. import java.awt.*;
  5. import java.awt.event.*;
  6. import borland.jbcl.control.*;
  7. import borland.jbcl.layout.*;
  8. import borland.jbcl.model.*;
  9. import borland.jbcl.view.*;
  10.  
  11. /**
  12.  * A simple sample application that shows how to use the tree control.
  13.  *
  14.  * @version     1.0, 06/10/97
  15.  * @author     Borland Development Team
  16.  */
  17. public class Frame1 extends DecoratedFrame {
  18.   BorderLayout borderLayout1 = new BorderLayout();
  19.   MenuBar menuBar1 = new MenuBar();
  20.   Menu menuFile = new Menu();
  21.   MenuItem menuFileExit = new MenuItem();
  22.   Menu menuHelp = new Menu();
  23.   MenuItem menuHelpAbout = new MenuItem();
  24.   SplitPanel splitPanel1 = new SplitPanel();
  25.   BevelPanel bevelPanel1 = new BevelPanel();
  26.   BevelPanel bevelPanel2 = new BevelPanel();
  27.   AttributePanel attributePanel1 = new AttributePanel();
  28.   TreeControl treeControl1 = new TreeControl();
  29.   Menu menuControl = new Menu();
  30.   CheckboxMenuItem menuControlReadOnly = new CheckboxMenuItem();
  31.   MenuItem menuControlInsertSibling = new MenuItem();
  32.   MenuItem menuControlInsertChild = new MenuItem();
  33.   MenuItem menuControlRemoveItem = new MenuItem();
  34.   CheckboxMenuItem menuControlShowGlyphs = new CheckboxMenuItem();
  35.   Menu menu1 = new Menu();
  36.   MenuItem menuControlPluses = new MenuItem();
  37.   MenuItem menuConrolArrows = new MenuItem();
  38.   BorderLayout borderLayout2 = new BorderLayout();
  39.   BorderLayout borderLayout3 = new BorderLayout();
  40.   Menu menu2 = new Menu();
  41.   MenuItem menuControlTextEditor = new MenuItem();
  42.   MenuItem menuControlChoiceEditor = new MenuItem();
  43.  
  44.   /**
  45.    * Construct the frame and it's UI elements
  46.    */
  47.   public Frame1() {
  48.     try {
  49.       jbInit();
  50.       fillTree();
  51.       setupAttributes();
  52.     }
  53.     catch (Exception e) {
  54.       borland.jbcl.util.Diagnostic.printStackTrace(e);
  55.     }
  56.   }
  57.  
  58.   /**
  59.    * Contains the UI elements and UI properties of the application's main frame
  60.    */
  61.   public void jbInit() throws Exception{
  62.     this.setLayout(borderLayout1);
  63.     this.setTitle("Simple TreeControl Sample");
  64.     this.setFont( new Font("Dialog", 0, 11));
  65.     menuFile.setLabel("File");
  66.     menuFileExit.setLabel("Exit");
  67.     menuFileExit.addActionListener(new Frame1_menuFileExit_ActionAdapter(this));
  68.     menuHelp.setLabel("Help");
  69.     menuHelpAbout.setLabel("About");
  70.     menuControl.setLabel("Control");
  71.     menuControlReadOnly.setLabel("Read Only");
  72.     menuControlInsertSibling.setLabel("Insert Sibling");
  73.     menuControlInsertSibling.addActionListener(new Frame1_menuControlInsertSibling_actionAdapter(this));
  74.     menuControlInsertChild.setLabel("Insert Child");
  75.     menuControlInsertChild.addActionListener(new Frame1_menuControlInsertChild_actionAdapter(this));
  76.     menuControlRemoveItem.setLabel("Remove Item");
  77.     menuControlShowGlyphs.setLabel("Show Glyphs");
  78.     menu1.setLabel("Style");
  79.     menuControlPluses.setLabel("Pluses");
  80.     menuControlPluses.addActionListener(new Frame1_menuControlPluses_actionAdapter(this));
  81.     menuConrolArrows.setLabel("Arrows");
  82.     menu2.setLabel("Editor");
  83.     menuControlTextEditor.setLabel("Text Item Editor");
  84.     menuControlTextEditor.addActionListener(new Frame1_menuControlTextEditor_actionAdapter(this));
  85.     menuControlChoiceEditor.setLabel("Choice Item Editor");
  86.     menuControlChoiceEditor.addActionListener(new Frame1_menuControlChoiceEditor_actionAdapter(this));
  87.     menuConrolArrows.addActionListener(new Frame1_menuConrolArrows_actionAdapter(this));
  88.     menuControlShowGlyphs.addActionListener(new Frame1_menuControlShowGlyphs_actionAdapter(this));
  89.     menuControlRemoveItem.addActionListener(new Frame1_menuControlRemoveItem_actionAdapter(this));
  90.     menuControlReadOnly.addItemListener(new Frame1_menuControlReadOnly_itemAdapter(this));
  91.     bevelPanel2.setLayout(borderLayout2);
  92.     bevelPanel1.setLayout(borderLayout3);
  93.     menuHelpAbout.addActionListener(new Frame1_menuHelpAbout_ActionAdapter(this));
  94.     menuFile.add(menuFileExit);
  95.     menuHelp.add(menuHelpAbout);
  96.     menuBar1.add(menuFile);
  97.     menuBar1.add(menuControl);
  98.     menuBar1.add(menuHelp);
  99.     //treeControl1.setEditInPlace(false);
  100.     treeControl1.setExpandByDefault(true);
  101.     treeControl1.addSelectionListener(new Frame1_treeControl1_selectionAdapter(this));
  102.     treeControl1.addMouseListener(new Frame1_treeControl1_mouseAdapter(this));
  103.     treeControl1.addComponentListener(new Frame1_treeControl1_componentAdapter(this));
  104.     this.setMenuBar(menuBar1);
  105.     this.add(splitPanel1, BorderLayout.CENTER);
  106.     splitPanel1.add(bevelPanel1, new PaneConstraints("bevelPanel1", "bevelPanel1", PaneConstraints.LEFT, 0.3f));
  107.     bevelPanel1.add(treeControl1, BorderLayout.CENTER);
  108.     splitPanel1.add(bevelPanel2, new PaneConstraints("bevelPanel1", "bevelPanel1", PaneConstraints.RIGHT, 0.7f));
  109.     bevelPanel2.add(attributePanel1, BorderLayout.CENTER);
  110.     menuControl.add(menuControlInsertSibling);
  111.     menuControl.add(menuControlInsertChild);
  112.     menuControl.add(menuControlRemoveItem);
  113.     menuControl.addSeparator();
  114.     menuControl.add(menuControlReadOnly);
  115.     menuControl.add(menuControlShowGlyphs);
  116.     menuControl.addSeparator();
  117.     menuControl.add(menu1);
  118.     menuControl.add(menu2);
  119.     menu1.add(menuControlPluses);
  120.     menu1.add(menuConrolArrows);
  121.     menu2.add(menuControlTextEditor);
  122.     menu2.add(menuControlChoiceEditor);
  123.   }
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.   /**
  138.    * Setup the inital attribute list and default values in
  139.    * the attribute panel by calling the InsertSibling() method on
  140.    * the attributePanel.
  141.    */
  142.   public void setupAttributes() {
  143.     attributePanel1.addItem("Size", "");
  144.     attributePanel1.addItem("Painter", treeControl1.getViewManager().getPainter(treeControl1.getRoot(), new Object(), 0).toString());
  145.     attributePanel1.addItem("Editor", treeControl1.getViewManager().getEditor(treeControl1.getRoot(), new Object(), 0).toString());
  146.     attributePanel1.addItem("Style", "");
  147.     attributePanel1.addItem("Selected Item", "");
  148.  
  149.     if (treeControl1.getStyle()==borland.jbcl.view.TreeView.STYLE_PLUSES)
  150.       attributePanel1.setValue("Style", "Pluses");
  151.     else if (treeControl1.getStyle()==borland.jbcl.view.TreeView.STYLE_ARROWS)
  152.       attributePanel1.setValue("Style", "Arrows");
  153.   }
  154.  
  155.   /**
  156.    * Setup the inital tree structure using addChild().  Later we'll show
  157.    * how to build on this using the model/view architecture.
  158.    */
  159.   private void fillTree() {
  160.     // Add the root
  161.     GraphLocation root = treeControl1.setRoot("Root Node");
  162.  
  163.     // Add the first child to the root
  164.     GraphLocation first = treeControl1.addChild(root, "First Child");
  165.  
  166.     // Add children to the first child of the root
  167.     treeControl1.addChild(first, "First child item 1");
  168.     treeControl1.addChild(first, "First child item 2");
  169.     treeControl1.addChild(first, "First child item 3");
  170.  
  171.     // Add the first child to the root
  172.     GraphLocation second = treeControl1.addChild(root, "Second Child");
  173.  
  174.     // Add children to the fist child of the root
  175.     treeControl1.addChild(second, "Second child item 1");
  176.     treeControl1.addChild(second, "Second child item 2");
  177.     treeControl1.addChild(second, "Second child item 3");
  178.  
  179.     // Select the first items
  180.     treeControl1.setSubfocus(treeControl1.getRoot());
  181.   }
  182.  
  183.   /**
  184.    * Use the itemStateChanged event to get notification when the
  185.    * state of a CheckboxMenuItem has changed.  This is used here
  186.    * to toggle the the EditInPlace property and the ReadOnly
  187.    * property of the tree.
  188.    */
  189.   void menuControlReadOnly_itemStateChanged(ItemEvent e) {
  190.     treeControl1.setEditInPlace(!(menuControlReadOnly.getState()));
  191.     treeControl1.setReadOnly(!(menuControlReadOnly.getState()));
  192.   }
  193.  
  194.   /**
  195.    * Use the componentResized event to get notification when
  196.    * the tree's size has changed.  This is used here to update
  197.    * the attribute panel with the trees new size.
  198.    */
  199.   void treeControl1_componentResized(ComponentEvent e) {
  200.     attributePanel1.setValue("Size", treeControl1.getSize().toString());
  201.   }
  202.  
  203.   /**
  204.    * Use the mouseClicked event to get notification when a
  205.    * mouse click has been performed on the control.  This is used
  206.    * here to expand and collapse expandable/collapsable nodes of the
  207.    * TreeControl.
  208.    */
  209.   void treeControl1_mouseClicked(MouseEvent e) {
  210.     GraphLocation[] selections = treeControl1.getSelection().getAll();
  211.     if (e.getClickCount() == 2) {
  212.       if (treeControl1.isExpanded(selections[0]))
  213.         treeControl1.collapse(selections[0]);
  214.       else
  215.         treeControl1.expand(selections[0]);
  216.     }
  217.   }
  218.  
  219.   /**
  220.    * Use the selectionChanged event to get notification when the
  221.    * selection has changed in the control.  This is used here to update
  222.    * the attribute panel with the current selection in the control.
  223.    * Using this event is the preferred way to determine the selected
  224.    * item in any JBCL control.
  225.    */
  226.   void treeControl1_selectionChanged(GraphSelectionEvent e) {
  227.     GraphLocation[] selections = treeControl1.getSelection().getAll();
  228.     attributePanel1.setValue("Selected Item", (String) treeControl1.get(selections[0]));
  229.   }
  230.  
  231.   /**
  232.    * Insert an item as a sibling to the selected node
  233.    */
  234.   void menuControlInsertSibling_actionPerformed(ActionEvent e) {
  235.     GraphLocation[] selections = treeControl1.getSelection().getAll();
  236.     treeControl1.addChild(selections[0].getParent(), "New sibling item");
  237.   }
  238.  
  239.   /**
  240.    * Insert an item as a child to the selected node
  241.    */
  242.   void menuControlInsertChild_actionPerformed(ActionEvent e) {
  243.     GraphLocation[] selections = treeControl1.getSelection().getAll();
  244.     treeControl1.addChild(selections[0], "New child item");
  245.   }
  246.  
  247.   /**
  248.    * Remove the selected item and it's children
  249.    */
  250.   void menuControlRemoveItem_actionPerformed(ActionEvent e) {
  251.     GraphLocation[] selections = treeControl1.getSelection().getAll();
  252.     treeControl1.remove(selections[0]);
  253.   }
  254.  
  255.   /**
  256.    * Set the Style property on the tree control to STYLE_PLUSES
  257.    */
  258.   void menuControlPluses_actionPerformed(ActionEvent e) {
  259.     treeControl1.setStyle(borland.jbcl.view.TreeView.STYLE_PLUSES);
  260.     attributePanel1.setValue("Style", "Pluses");
  261.     }
  262.  
  263.   /**
  264.    * Set the Style property on the tree control to STYLE_ARROWS
  265.    */
  266.   void menuConrolArrows_actionPerformed(ActionEvent e) {
  267.     treeControl1.setStyle(borland.jbcl.view.TreeView.STYLE_ARROWS);
  268.     attributePanel1.setValue("Style", "Arrows");
  269.   }
  270.  
  271.   /**
  272.    * Set the tree control's editor to a TextItemEditor()
  273.    */
  274.   void menuControlTextEditor_actionPerformed(ActionEvent e) {
  275.     treeControl1.setViewManager(new BasicViewManager(new FocusableItemPainter(new SelectableTextItemPainter()),new TextItemEditor()));
  276.   }
  277.  
  278.   /**
  279.    * Set the tree control's editor to a ChoiceItemEditor()
  280.    */
  281.   void menuControlChoiceEditor_actionPerformed(ActionEvent e) {
  282.     String[] choices = new String[] {"Selected Item 1", "Selected Item 2", "Selected Item 3"};
  283.     treeControl1.setViewManager(new BasicViewManager(new FocusableItemPainter(new SelectableTextItemPainter()), new ChoiceItemEditor(choices)));
  284.   }
  285.  
  286.   void menuControlShowGlyphs_actionPerformed(ActionEvent e) {
  287.  
  288.   }
  289.  
  290.   /**
  291.    * Exit the sample application by calling System.exit(int).
  292.    * This returns an exit code specified by int to the
  293.    * calling process.
  294.    */
  295.   public void menuFileExit_actionPerformed(ActionEvent e) {
  296.     System.exit(0);
  297.   }
  298.  
  299.   /**
  300.    * Display an about box for the sample application.  This uses
  301.    * the Frame1_AboutBox class also contained in this source
  302.    * file.
  303.    */
  304.   public void menuHelpAbout_actionPerformed(ActionEvent e) {
  305.     Frame1_AboutBox dlg = new Frame1_AboutBox(this);
  306.     Dimension dlgSize = dlg.getPreferredSize();
  307.     Dimension frmSize = getSize();
  308.     Point loc = getLocation();
  309.     dlg.setLocation((frmSize.width - dlgSize.width) / 2 + loc.x, (frmSize.height - dlgSize.height) / 2 + loc.y);
  310.     dlg.setModal(true);
  311.     dlg.show();
  312.   }
  313. }
  314.  
  315. class Frame1_menuFileExit_ActionAdapter implements ActionListener {
  316.   Frame1 adaptee;
  317.  
  318.   Frame1_menuFileExit_ActionAdapter(Frame1 adaptee) {
  319.     this.adaptee = adaptee;
  320.   }
  321.  
  322.   public void actionPerformed(ActionEvent e) {
  323.     adaptee.menuFileExit_actionPerformed(e);
  324.   }
  325. }
  326.  
  327. class Frame1_menuHelpAbout_ActionAdapter implements ActionListener {
  328.   Frame1 adaptee;
  329.  
  330.   Frame1_menuHelpAbout_ActionAdapter(Frame1 adaptee) {
  331.     this.adaptee = adaptee;
  332.   }
  333.  
  334.   public void actionPerformed(ActionEvent e) {
  335.     adaptee.menuHelpAbout_actionPerformed(e);
  336.   }
  337. }
  338.  
  339. class Frame1_InsetsPanel extends Panel {
  340.   protected Insets insets;
  341.  
  342.   public Insets getInsets() {
  343.     return insets == null ? super.getInsets() : insets;
  344.   }
  345.  
  346.   public void setInsets(Insets insets) {
  347.     this.insets = insets;
  348.   }
  349. }
  350.  
  351. class Frame1_treeControl1_componentAdapter extends java.awt.event.ComponentAdapter {
  352.   Frame1 adaptee;
  353.  
  354.   Frame1_treeControl1_componentAdapter(Frame1 adaptee) {
  355.     this.adaptee = adaptee;
  356.   }
  357.  
  358.   public void componentResized(ComponentEvent e) {
  359.     adaptee.treeControl1_componentResized(e);
  360.   }
  361. }
  362.  
  363. class Frame1_treeControl1_mouseAdapter extends java.awt.event.MouseAdapter {
  364.   Frame1 adaptee;
  365.  
  366.   Frame1_treeControl1_mouseAdapter(Frame1 adaptee) {
  367.     this.adaptee = adaptee;
  368.   }
  369.  
  370.   public void mouseClicked(MouseEvent e) {
  371.     adaptee.treeControl1_mouseClicked(e);
  372.   }
  373. }
  374.  
  375. class Frame1_treeControl1_selectionAdapter extends borland.jbcl.model.GraphSelectionAdapter {
  376.   Frame1 adaptee;
  377.  
  378.   Frame1_treeControl1_selectionAdapter(Frame1 adaptee) {
  379.     this.adaptee = adaptee;
  380.   }
  381.  
  382.   public void selectionChanged(GraphSelectionEvent e) {
  383.     adaptee.treeControl1_selectionChanged(e);
  384.   }
  385. }
  386.  
  387. class Frame1_menuControlReadOnly_itemAdapter implements java.awt.event.ItemListener {
  388.   Frame1 adaptee;
  389.  
  390.   Frame1_menuControlReadOnly_itemAdapter(Frame1 adaptee) {
  391.     this.adaptee = adaptee;
  392.   }
  393.  
  394.   public void itemStateChanged(ItemEvent e) {
  395.     adaptee.menuControlReadOnly_itemStateChanged(e);
  396.   }
  397. }
  398.  
  399. class Frame1_menuControlInsertSibling_actionAdapter implements java.awt.event.ActionListener {
  400.   Frame1 adaptee;
  401.  
  402.   Frame1_menuControlInsertSibling_actionAdapter(Frame1 adaptee) {
  403.     this.adaptee = adaptee;
  404.   }
  405.  
  406.   public void actionPerformed(ActionEvent e) {
  407.     adaptee.menuControlInsertSibling_actionPerformed(e);
  408.   }
  409. }
  410.  
  411. class Frame1_menuControlInsertChild_actionAdapter implements java.awt.event.ActionListener {
  412.   Frame1 adaptee;
  413.  
  414.   Frame1_menuControlInsertChild_actionAdapter(Frame1 adaptee) {
  415.     this.adaptee = adaptee;
  416.   }
  417.  
  418.   public void actionPerformed(ActionEvent e) {
  419.     adaptee.menuControlInsertChild_actionPerformed(e);
  420.   }
  421. }
  422.  
  423. class Frame1_menuControlRemoveItem_actionAdapter implements java.awt.event.ActionListener {
  424.   Frame1 adaptee;
  425.  
  426.   Frame1_menuControlRemoveItem_actionAdapter(Frame1 adaptee) {
  427.     this.adaptee = adaptee;
  428.   }
  429.  
  430.   public void actionPerformed(ActionEvent e) {
  431.     adaptee.menuControlRemoveItem_actionPerformed(e);
  432.   }
  433. }
  434.  
  435. class Frame1_menuControlShowGlyphs_actionAdapter implements java.awt.event.ActionListener {
  436.   Frame1 adaptee;
  437.  
  438.   Frame1_menuControlShowGlyphs_actionAdapter(Frame1 adaptee) {
  439.     this.adaptee = adaptee;
  440.   }
  441.  
  442.   public void actionPerformed(ActionEvent e) {
  443.     adaptee.menuControlShowGlyphs_actionPerformed(e);
  444.   }
  445. }
  446.  
  447.  
  448. /**
  449.  * The default Application Wizard generated about box.
  450.  *
  451.  * @version     1.0, 06/10/97
  452.  * @author     Borland Development Team
  453.  */
  454. class Frame1_AboutBox extends Dialog implements ActionListener {
  455.   Panel panel1 = new Panel();
  456.   BevelPanel bevelPanel1 = new BevelPanel();
  457.   Frame1_InsetsPanel insetsPanel1 = new Frame1_InsetsPanel();
  458.   Frame1_InsetsPanel insetsPanel2 = new Frame1_InsetsPanel();
  459.   Frame1_InsetsPanel insetsPanel3 = new Frame1_InsetsPanel();
  460.   Button button1 = new Button();
  461.   ImageControl imageControl1 = new ImageControl();
  462.   Label label1 = new Label();
  463.   Label label2 = new Label();
  464.   Label label3 = new Label();
  465.   Label label4 = new Label();
  466.   BorderLayout borderLayout1 = new BorderLayout();
  467.   BorderLayout borderLayout2 = new BorderLayout();
  468.   FlowLayout flowLayout1 = new FlowLayout();
  469.   GridLayout gridLayout1 = new GridLayout();
  470.   String product = "Simple TreeControl Sample";
  471.   String version = "Version 1.0";
  472.   String copyright = "Copyright (c) 1997";
  473.   String comments = "";
  474.  
  475.   /**
  476.    * Construct the frame and it's UI elements
  477.    * @param parent The parent frame for the dialog
  478.    */
  479.   public Frame1_AboutBox(Frame parent) {
  480.     super(parent);
  481.     try {
  482.       jbInit();
  483.     }
  484.     catch (Exception e) {
  485.       borland.jbcl.util.Diagnostic.printStackTrace(e);
  486.     }
  487.     pack();
  488.   }
  489.  
  490.   /**
  491.    * Contains the UI elements and UI properties of the about box
  492.    */
  493.   void jbInit() throws Exception{
  494.     this.setTitle("About");
  495.     setResizable(false);
  496.     this.add(panel1, null);
  497.     panel1.setLayout(borderLayout1);
  498.     bevelPanel1.setLayout(borderLayout2);
  499.     insetsPanel2.setLayout(flowLayout1);
  500.     insetsPanel2.add(imageControl1, null);
  501.     insetsPanel2.setInsets(new Insets(10, 10, 10, 10));
  502.     bevelPanel1.add(insetsPanel2, BorderLayout.WEST);
  503.     gridLayout1.setRows(4);
  504.     gridLayout1.setColumns(1);
  505.     label1.setText(product);
  506.     label2.setText(version);
  507.     label3.setText(copyright);
  508.     label4.setText(comments);
  509.     insetsPanel3.setLayout(gridLayout1);
  510.     insetsPanel3.add(label1, null);
  511.     insetsPanel3.add(label2, null);
  512.     insetsPanel3.add(label3, null);
  513.     insetsPanel3.add(label4, null);
  514.     insetsPanel3.setInsets(new Insets(10, 60, 10, 10));
  515.     bevelPanel1.add(insetsPanel3, BorderLayout.CENTER);
  516.     button1.setLabel("OK");
  517.     button1.addActionListener(this);
  518.     insetsPanel1.add(button1, null);
  519.     panel1.add(insetsPanel1, BorderLayout.SOUTH);
  520.     panel1.add(bevelPanel1, BorderLayout.NORTH);
  521.     try {
  522.       imageControl1.setImageName("sample.gif");
  523.     }
  524.     catch (Exception e) {
  525.       borland.jbcl.util.Diagnostic.printStackTrace(e);
  526.     }
  527.     pack();
  528.   }
  529.  
  530.   /**
  531.    * Catch the action performed event on button1 to dismiss the
  532.    * dialog.
  533.    */
  534.   public void actionPerformed(ActionEvent e) {
  535.     if (e.getSource() == button1) {
  536.     setVisible(false);
  537.     dispose();
  538.     }
  539.   }
  540. }
  541.  
  542. class Frame1_menuControlPluses_actionAdapter implements java.awt.event.ActionListener {
  543.   Frame1 adaptee;
  544.  
  545.   Frame1_menuControlPluses_actionAdapter(Frame1 adaptee) {
  546.     this.adaptee = adaptee;
  547.   }
  548.  
  549.   public void actionPerformed(ActionEvent e) {
  550.     adaptee.menuControlPluses_actionPerformed(e);
  551.   }
  552. }
  553.  
  554. class Frame1_menuConrolArrows_actionAdapter implements java.awt.event.ActionListener {
  555.   Frame1 adaptee;
  556.  
  557.   Frame1_menuConrolArrows_actionAdapter(Frame1 adaptee) {
  558.     this.adaptee = adaptee;
  559.   }
  560.  
  561.   public void actionPerformed(ActionEvent e) {
  562.     adaptee.menuConrolArrows_actionPerformed(e);
  563.   }
  564. }
  565.  
  566. class Frame1_menuControlTextEditor_actionAdapter implements java.awt.event.ActionListener{
  567.   Frame1 adaptee;
  568.  
  569.   Frame1_menuControlTextEditor_actionAdapter(Frame1 adaptee) {
  570.     this.adaptee = adaptee;
  571.   }
  572.  
  573.   public void actionPerformed(ActionEvent e) {
  574.     adaptee.menuControlTextEditor_actionPerformed(e);
  575.   }
  576. }
  577.  
  578. class Frame1_menuControlChoiceEditor_actionAdapter implements java.awt.event.ActionListener {
  579.   Frame1 adaptee;
  580.  
  581.   Frame1_menuControlChoiceEditor_actionAdapter(Frame1 adaptee) {
  582.     this.adaptee = adaptee;
  583.   }
  584.  
  585.   public void actionPerformed(ActionEvent e) {
  586.     adaptee.menuControlChoiceEditor_actionPerformed(e);
  587.   }
  588. }
  589.  
  590.  
  591.